import {
    showNotify,
    showToast,
    showSuccessToast,
    showFailToast,
    showDialog,
    showImagePreview,
    showConfirmDialog,
    Lazyload
} from 'vant'
import 'vant/es/toast/style'
import 'vant/es/notify/style'
import 'vant/es/dialog/style'
import 'vant/es/image-preview/style'
import 'vant/es/notify/style'

function installVant(app){
    app.config.globalProperties.$showNotify = showNotify;
    app.config.globalProperties.$showToast = showToast;
    app.config.globalProperties.$showSuccessToast = showSuccessToast;
    app.config.globalProperties.$showFailToast  = showFailToast ;
    app.config.globalProperties.$showDialog = showDialog;
    app.config.globalProperties.$showImagePreview = showImagePreview;
    app.config.globalProperties.$showConfirmDialog = showConfirmDialog;
    app.config.globalProperties.$showToast = showToast;
    //Lazyload 是 Vue 指令，使用前需要对指令进行注册。
    app.use(Lazyload);
}
export default installVant;